class PspData {
    static belongsTo = [task: Task, user: User]
	
    Task task
    User user
	
    String phaseName
    Date startDate
    int actualTimeInMin
    int interuptTimeInMin
	
    Date dateCreated
    Date lastUpdated
	
    static constraints = {
        phaseName(blank:false)
        startDate(blank:false)
        actualTimeInMin(blank:false)
        interuptTimeInMin(blank:false)
    }
	
    static mapping = {
                task lazy:false
    }
	
    public static boolean hasAnyData(User user, Task task) {
		
        if (findByUserAndTask(user, task)) {
            return true
        }
        return false
    }
}
